﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@

<!-- 网页的主体内容-->
<!--   -->
<div class="container d-flex justify-content-center" style="margin-top:200px">
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover table-sm">
            <thead class="thead-dark">
                <tr class="text-center">
                    <th>编号</th>
                    <th>昵称</th>
                    <th>性别</th>
                    <th>用户名</th>
                    <th>密码</th>
                    <th>查询</th>
                    <th>删除</th>
                    <th>头像</th>
                </tr>
            </thead>
            <tbody>
                @foreach (User user in ViewBag.Users)
                {
                <tr class="text-center" style="height:50px">
                    <td><a href="~/home/detail/@user.Id">@user.Id</a></td>
                    <td>@user.Nicheng</td>
                    @if (user.Sex)
                    {
                        <td>男</td>
                    }
                    else
                    {
                        <td>女</td>
                    }

                    <td>@user.Username</td>
                    <td>@user.Password</td>
                    <td><a href="~/user/edit/@user.Id">编辑</a></td>
                    <td><a href="~/user/Delete/@user.Id">删除</a></td>
                    <td><img src="~/uploads/@user.PhotoPath" style="width:50px;height:50px;" /></td>
                </tr>
                }
            </tbody>

        </table>
    </div>
</div>